package br.ufmg.dcc.vod.remoteworkers.registry;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class HostnameUtils {

	public static String getLocaHostname() throws UnknownHostException {
		String localHost = System.getProperty("java.rmi.server.hostname");
		
		if (localHost == null) {
			localHost = InetAddress.getLocalHost().getCanonicalHostName();
		}
		
		return localHost;
	}
	
}
